package hu.elte.inf.holiuml.fileutil;

import java.io.IOException;

import javax.swing.JFrame;

import hu.elte.inf.holiuml.model.ClassDiagram;

/**
 * Generates source code from class diagram
 * 
 * @author Jozsef Sipos
 *
 */
public interface CodeGenerator {

	/**
	 * Does everything (well, maybe too much) about code generation:
	 * <ul>
	 *  <li> opens JFileChooser to choose directory for generated files </li>
	 *  <li> asks for package, namespace, etc... name </li>
	 *  <li> generates source code </li>
	 *  <li> saves files (.java, .cpp, etc...) to the specified location </li>
	 * </ul>
	 *   
	 * @param fromDiagram
	 * @throws IOException
	 */
	public void generate(ClassDiagram fromDiagram, JFrame mainFrame) throws IOException;
	
}
